\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc1\cf1 Q: I'm building a bundle project, but I want the bundle to have a different extension than the default .bundle so I can treat it as a document for my own application or for an application like Preferences or BackSpace.\
\
A: When bundles were originally released it was thought that they would only be used to dynamically load infrequently used parts of an application. However, it's now very common and even encouraged to make your application extensible by having it accept bundle documents at runtime. Applications like Preferences, BackSpace and IconBuilder all do this. Since these bundles are essentially unique file formats (you wouldn't, for instance, try to load a BackSpace module into Preferences) they need unique extensions.\
\
In Release 3.0 and 3.1 you can change the extension of a bundle from its default of .bundle by adding the following lines to the Makefile.preamble and Makefile.postamble respectively:\
\
\b Addition to Makefile.preamble
\b0 \
\
Add the following to Makefile.preamble to set a new extension and install directory (replace
\b XXXX
\b0 with the new extension and
\b AppName
\b0 with your application's name):\
\
\f3\fs24 BUNDLE_EXT = .
\b XXXX
\b0 \
INSTALLDIR = $(HOME)/Library/
\b AppName
\b0 \
OTHER_PRODUCT_DEPENDS = $(NAME)$(BUNDLE_EXT)\
OTHER_GARBAGE = $(NAME)$(BUNDLE_EXT)\
\f0\fs28 \
\b Addition to Makefile.postamble
\b0 \
\
Add the following to Makefile.postamble to build the bundle with the new extension:\
\
Remove the old version of the named bundle before installation:\
Move the bundle to its new extension after installation:\
\
\f3\fs24 after_install::\
mv $(DSTROOT)$(INSTALLDIR)/$(NAME).bundle \\\
$(DSTROOT)$(INSTALLDIR)/$(NAME)$(BUNDLE_EXT)\
\f0\fs28 \
Link the bundle to its new extension for incremental building/testing:\
\
\f3\fs24 $(NAME)$(BUNDLE_EXT):\
-ln -s $(NAME).bundle $(NAME)$(BUNDLE_EXT)\
\f0\fs28 \
In Release 3.2 this problem will be fixed by the addition of the BUNDLE_EXTENSION macro. You can simply set this macro in the Makefile.preamble to get the new extension.\